export default {
  namespaced: true,
  state: {
    categories: [
      {
        id: 1,
        name: '手机数码',
        children: [
          { id: 101, name: '手机', link: '/category/phone' },
          { id: 102, name: '平板电脑', link: '/category/tablet' },
          { id: 103, name: '智能手表', link: '/category/smartwatch' },
          { id: 104, name: '耳机音响', link: '/category/audio' }
        ]
      },
      {
        id: 2,
        name: '电脑办公',
        children: [
          { id: 201, name: '笔记本', link: '/category/laptop' },
          { id: 202, name: '台式机', link: '/category/desktop' },
          { id: 203, name: '显示器', link: '/category/monitor' },
          { id: 204, name: '外设配件', link: '/category/accessories' }
        ]
      },
      {
        id: 3,
        name: '智能家电',
        children: [
          { id: 301, name: '电视', link: '/category/tv' },
          { id: 302, name: '空调', link: '/category/airconditioner' },
          { id: 303, name: '冰箱', link: '/category/refrigerator' },
          { id: 304, name: '洗衣机', link: '/category/washer' }
        ]
      },
      {
        id: 4,
        name: '摄影摄像',
        children: [
          { id: 401, name: '相机', link: '/category/camera' },
          { id: 402, name: '摄像机', link: '/category/videocamera' },
          { id: 403, name: '镜头配件', link: '/category/lens' },
          { id: 404, name: '相机配件', link: '/category/camera-acc' }
        ]
      },
      {
        id: 5,
        name: '游戏电竞',
        children: [
          { id: 501, name: '游戏主机', link: '/category/console' },
          { id: 502, name: '游戏外设', link: '/category/gaming-acc' },
          { id: 503, name: '游戏耳机', link: '/category/gaming-headset' },
          { id: 504, name: '游戏显示器', link: '/category/gaming-monitor' }
        ]
      },
      {
        id: 6,
        name: '网络产品',
        children: [
          { id: 601, name: '路由器', link: '/category/router' },
          { id: 602, name: '网络设备', link: '/category/network' },
          { id: 603, name: '网络配件', link: '/category/network-acc' },
          { id: 604, name: '安防监控', link: '/category/security' }
        ]
      }
    ]
  },
  getters: {
    getAllCategories: state => state.categories
  }
}